Skip to content

[DTLS 1.3] Reject updated Client Hello with unsolicited key share modification - #6127

Merged
reneme merged 2 commits into
randombit:masterfrom
Rohde-Schwarz:fix/reject_updated_client_hello_with_unsolicited_key_share_modification
Nov 13, 2026
Merged

reneme merged 2 commits into
randombit:masterfrom
Rohde-Schwarz:fix/reject_updated_client_hello_with_unsolicited_key_share_modification

Conversation

@reneme

@reneme reneme commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

If we, as the server, sent a HelloRetryRequest that does not contain a key_share extension (i.e. we don't want the client to modify their choice of key agreement algorithm) we must not accept the content of the key_share extension to change in the second ClientHello.

At the moment we will send HelloRetryRequest only if we do want the client's key_share to change. So this code is currently never accessed. However, with DTLS 1.3 we might send HelloRetryRequest only for the cookie-based return routability check and without requesting another key agreement algorithm.

This is a fix for the Copilot finding over here: #6062 (comment)
A regression test is added here: randombit/plzn#1

reneme and others added 2 commits November 13, 2026 10:25
Co-Authored-By: Amos Treiber <amos.treiber@rohde-schwarz.com>
If we, as the server, sent a HelloRetryRequest that does not contain a
key_share extension (i.e. we don't want the client to modify their
choice of key agreement algorithm) we must not accept the content of the
key_share extension to change in the second ClientHello.

At the moment we will send HelloRetryRequest _only if_ we do want the
client's key_share to change. So this code is currently never accessed.
However, with DTLS 1.3 we might send HelloRetryRequest _only_ for the
cookie-based return routability check and without requesting another
key agreement algorithm.

Co-Authored-By: Amos Treiber <amos.treiber@rohde-schwarz.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@randombit randombit left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, thanks lgtm

@reneme
reneme merged commit 3aec761 into randombit:master Nov 13, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants